package com.example.myerp.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.myerp.S_gather_Dto;
import com.example.myerp.pojo.Inbound_Scheduling;
import com.example.myerp.pojo.S_gather;
import com.example.myerp.service.S_gatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhuxingyu
 * @since 2021-08-10
 */
@RestController
@RequestMapping("/purchase/s_gather")
@SuppressWarnings("all")
public class S_gatherController {
    @Autowired
    S_gatherService service;

    @RequestMapping("/insertS_gather")
    public void insertS_gather(S_gather_Dto s_gather_dto) {
        service.insertS_gather(s_gather_dto);
    }

    @RequestMapping("/sRegCkLis")
    public IPage<S_gather> sgatherRegChckList(Long pageNum, Long pageSize) {
        return service.sgatherRegChckList(pageNum, pageSize);
    }

    @RequestMapping("/checkRegSgather")
    public void checkRegSgather(S_gather s_gather) {
        service.checkRegSgather(s_gather);
    }

    @RequestMapping("/noCheckRegSgather")
    public void noCheckRegSgather(Long id) {
        service.noCheckRegSgather(id);
    }

    @RequestMapping("/sgatherStore")
    public IPage<S_gather> makeSgatherStore(Long pageNum, Long pageSize) {
        return service.makeSgatherStore(pageNum, pageSize);
    }

    @RequestMapping("/updInbSch")
    public Integer updInbSch(Inbound_Scheduling ins) {
        return service.updInbSch(ins);
    }


    @RequestMapping("/regSgatherScell")
    public IPage<S_gather> regSgatherScell(Long pageNum, Long pageSize) {
        return service.regSgatherScell(pageNum, pageSize);
    }

    @RequestMapping("/updSell")
    public void updSell(S_gather_Dto sGatherDto) {
        service.updStatus(sGatherDto);
    }

    @RequestMapping("/chenkSgaRegCell")
    public IPage<S_gather> chenkSgaRegCell(Long pageNum, Long pageSize) {
        return service.chenkSgaRegCell(pageNum, pageSize);
    }


    @RequestMapping("/updaGthOver")
    public void updaGthOver(S_gather_Dto sGatherDto) {
        service.updaGthOver(sGatherDto);
    }

    @RequestMapping("/sPayCellInfoDet")
    public IPage<S_gather> sPayCellInfoDet(Long pageNum, Long pageSize) {
        return service.sPayCellInfoDet(pageNum,pageSize);
    }

    @RequestMapping("/addSgath")//purchase/s_gather
    public void insertS_gather2(@RequestBody  S_gather_Dto s_gather_dto){
        service.insertS_gather2(s_gather_dto);
    }
}
